const { ccclass, property, menu, executionOrder } = cc._decorator;

@ccclass
@menu("Tweens/InitThing")
@executionOrder(-1)
export default class InitThing extends cc.Component {

    @property
    initPosition: cc.Vec4 = new cc.Vec4();
    @property
    initScale: cc.Vec4 = new cc.Vec4(0, 1, 1, 1);
    @property
    initOpacity: cc.Vec2 = cc.v2(0, 255);
    @property
    initActive: cc.Vec2 = cc.v2(0, 1);

    onLoad() {
        this.initPosition.x != 0 && this.node.setPosition(this.initPosition.y, this.initPosition.z, this.initPosition.w);
        this.initScale.x != 0 && this.node.setScale(this.initScale.y, this.initScale.z, this.initScale.w);
        this.initOpacity.x != 0 && (this.node.opacity = this.initOpacity.y);
        this.initActive.x != 0 && (this.node.active = this.initActive.y != 0);
    }

    start() { }
}
